#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    // 点击获取
    connect(ui->halfBtn,&QPushButton::clicked,[=](){
        ui->widget->setHalf();
    });
     //点击改变, 点击获取
    connect(ui->getValueBtn,&QPushButton::clicked,[=](){
        ui->widget->getValue();
    });
}

MainWindow::~MainWindow()
{
    delete ui;
}


